3.1059 \(\int \frac{b+2 c x^n}{x (b+c x^n)} \, dx\)

Optimal. Leaf size=15 \[ \frac{\log \left (b+c x^n\right )}{n}+\log (x) \]

[Out]

Log[x] + Log[b + c*x^n]/n

________________________________________________________________________________________

Rubi [A]  time = 0.0153942, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {446, 72} \[ \frac{\log \left (b+c x^n\right )}{n}+\log (x) \]

Antiderivative was successfully verified.

[In]

Int[(b + 2*c*x^n)/(x*(b + c*x^n)),x]

[Out]

Log[x] + Log[b + c*x^n]/n

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rubi steps

\begin{align*} \int \frac{b+2 c x^n}{x \left (b+c x^n\right )} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{b+2 c x}{x (b+c x)} \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{x}+\frac{c}{b+c x}\right ) \, dx,x,x^n\right )}{n}\\ &=\log (x)+\frac{\log \left (b+c x^n\right )}{n}\\ \end{align*}

Mathematica [A]  time = 0.0137174, size = 15, normalized size = 1. \[ \frac{\log \left (b+c x^n\right )}{n}+\log (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(b + 2*c*x^n)/(x*(b + c*x^n)),x]

[Out]

Log[x] + Log[b + c*x^n]/n

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 17, normalized size = 1.1 \begin{align*}{\frac{\ln \left ({x}^{n} \left ( b+c{x}^{n} \right ) \right ) }{n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b+2*c*x^n)/x/(b+c*x^n),x)

[Out]

1/n*ln(x^n*(b+c*x^n))

________________________________________________________________________________________

Maxima [B]  time = 0.931054, size = 63, normalized size = 4.2 \begin{align*} b{\left (\frac{\log \left (x\right )}{b} - \frac{\log \left (\frac{c x^{n} + b}{c}\right )}{b n}\right )} + \frac{2 \, \log \left (\frac{c x^{n} + b}{c}\right )}{n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b+2*c*x^n)/x/(b+c*x^n),x, algorithm="maxima")

[Out]

b*(log(x)/b - log((c*x^n + b)/c)/(b*n)) + 2*log((c*x^n + b)/c)/n

________________________________________________________________________________________

Fricas [A]  time = 1.09325, size = 42, normalized size = 2.8 \begin{align*} \frac{n \log \left (x\right ) + \log \left (c x^{n} + b\right )}{n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b+2*c*x^n)/x/(b+c*x^n),x, algorithm="fricas")

[Out]

(n*log(x) + log(c*x^n + b))/n

________________________________________________________________________________________

Sympy [A]  time = 0.576391, size = 29, normalized size = 1.93 \begin{align*} \begin{cases} \log{\left (x \right )} & \text{for}\: c = 0 \wedge \left (c = 0 \vee n = 0\right ) \\\frac{\left (b + 2 c\right ) \log{\left (x \right )}}{b + c} & \text{for}\: n = 0 \\\log{\left (x \right )} + \frac{\log{\left (\frac{b}{c} + x^{n} \right )}}{n} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b+2*c*x**n)/x/(b+c*x**n),x)

[Out]

Piecewise((log(x), Eq(c, 0) & (Eq(c, 0) | Eq(n, 0))), ((b + 2*c)*log(x)/(b + c), Eq(n, 0)), (log(x) + log(b/c
+ x**n)/n, True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{2 \, c x^{n} + b}{{\left (c x^{n} + b\right )} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b+2*c*x^n)/x/(b+c*x^n),x, algorithm="giac")

[Out]

integrate((2*c*x^n + b)/((c*x^n + b)*x), x)